#include "ia32_types.h"
bool InsertHookStructIntoList(PHOOK_EPT_STRUCT* pStruct, PHOOK_EPT_STRUCT pInsertStruct);
bool FindFunctionIsHooked(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pPa);
PHOOK_EPT_STRUCT RemoveHookStructByPA(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pa);
bool FullEptStructAccess(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pOriginalPa, EptCommonEntry* pEptCommonEntry);
bool FullExecuteEptStructAccess(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pOriginalPa, EptCommonEntry* pEptCommonEntry, ULONG_PTR pTotalOriginalPa);
bool FullEptStructWriteAccess(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pOriginalPa, EptCommonEntry* pEptCommonEntry, ULONG_PTR pTotalOriginalPa);
bool HookProcFunction(ULONG_PTR pFunction, ULONG_PTR pOriginalFunction, ULONG_PTR pDealFunction, ULONG_PTR nCodeLen, ULONG_PTR pParamPointer);
PHOOK_EPT_STRUCT GetFunctionHookedStruct(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pPa);

bool FindRing3FunctionIsHooked(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pOriginalVa, ULONG_PTR nProcessID);
ULONG_PTR GetRing3HookByPIDAndOriginalVA(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR pOriginalVa, ULONG_PTR nProcessID);
bool FindRing3UserProcIsHooked(PHOOK_EPT_STRUCT* pStruct, ULONG_PTR nProcessID);

typedef struct _DEAL_FUNCTION_PARAM{
	ULONG_PTR r15;
	ULONG_PTR r14;
	ULONG_PTR r13;
	ULONG_PTR r12;
	ULONG_PTR r11;
	ULONG_PTR r10;
	ULONG_PTR r9;
	ULONG_PTR r8;
	ULONG_PTR rdi;
	ULONG_PTR rsi;
	ULONG_PTR rbp;
	ULONG_PTR rsp;
	ULONG_PTR rbx;
	ULONG_PTR rdx;
	ULONG_PTR rcx;
	ULONG_PTR rax;
	ULONG_PTR returnAddress;
	ULONG_PTR pValueArrary[1];
}DEAL_FUNCTION_PARAM, *PDEAL_FUNCTION_PARAM;